package com.mxin.util;

import java.lang.reflect.ParameterizedType;

public class ReflectUtil {

	public static <T> Class<T> getSuperclass(Object o, int i) {
		try {
			return ((Class<T>) ((ParameterizedType) (o.getClass()
					.getGenericSuperclass())).getActualTypeArguments()[i]);
		} catch (ClassCastException e) {
		}
		return null;
	}

}
